package com.zhiyou100.video.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zhiyou100.video.mapper.SpeakerMapper;
import com.zhiyou100.video.model.Speaker;
import com.zhiyou100.video.service.SpeakerService;

@Service
@Transactional
public class SpeakerServiceImpl implements SpeakerService {

	@Autowired
	private SpeakerMapper speakerMapper;

	@Override
	public List<Speaker> selectAll(){
		return speakerMapper.selectAll();
	}

	@Override
	public int insertSpeaker(Speaker speaker) {
		return speakerMapper.insertSpeaker(speaker);
	}

	@Override
	public List<Speaker> selectByNameOrJob(Speaker speaker) {
		return speakerMapper.selectByNameOrJob(speaker);
	}
	
	@Override
	public Speaker selectById(int id) {
		return speakerMapper.selectById(id);
	} 
	
	@Override
	public int updateSpeaker(Speaker speaker) {
		return speakerMapper.updateSpeaker(speaker);
	} 

	@Override
	public int deleteById(int id) {
		return speakerMapper.deleteById(id);
	}

}
